<?
include_once "accesscontrol.php";
require_once("../conn.php");

$c_name = $_GET['cname'];
$ename  = $_GET['name'];

$q1 = "SELECT * FROM job_employer_info WHERE CompanyName= '$c_name' AND ename = '$ename'";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);

$q2 = "SELECT * FROM job_post WHERE Company= '$c_name' AND ename = '$ename'";
$r2 = mysql_query($q2) or die(mysql_error());
?>
<br>
<br>
<center>
	<font size=5><?=$a1[CompanyName]?></font><br>
	<a href="http://<?=$a1[website]?>"><font size=3>http://<?=$a1[website]?></font></a>
</center>
<br>
<br>	

<table align=center border=1 bordercolor=993300 cellspacing=0 width=460>
	<tr>
		<td>
			<table border=0 width=500 cellspacing=0 cellpadding=4>
				<tr>
					<td width=500 bgcolor=#736F6E align=center>
						<font color=white size=3><b>Company Facts</b></font>
					</td>
				</tr>
				<tr>
					<td>
						<b>Company Name:</b><br>
						<?=$a1[CompanyName]?>
					</td>
				</tr>
				<tr>
					<td>
						<b>Year Established:</b><br>
						<?=$a1[YearEstablished]?>
					</td>
				</tr>
				<tr>
					<td>
						<b>Company Capital:</b><br>
						<?=$a1[capital]?>
					</td>
				</tr>
				<tr>
					<td>
						<b>Location:</b><br>
						<?=$a1[CompanyAddress]?>  <?=$a1[street]?>  <?=$a1[CompanyCity]?>,<br>
						<?=$a1[CompanyZip]?>  <?=$a1[CompanyState ]?>,<br>
						<?=$a1[CompanyCountry]?>
					</td>
				</tr>
				<tr>
					<td>
						<b>Website:</b><br>
						<a href="http://<?=$a1[website]?>">http://<?=$a1[website]?></a>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<br>
<br>
<table align=center border=1 bordercolor=993300 cellspacing=0 width=460>
	<tr>
		<td>
			<table border=0 width=500 cellspacing=0 cellpadding=4>
				<tr>
					<td width=500 bgcolor=#736F6E align=center>
						<font color=white size=3><b>Jobs Posted By Company</b></font>
					</td>
				</tr>
<?
while($as = mysql_fetch_array($r2))
{
$time = strtotime($as['createdTime']);
$dateAdd = date("d M Y" ,$time);
?>
<table border=0 width=500 cellspacing=0 cellpadding=4>	
<?
if($col == "cococo")
	    { 
	     $col = "dddddd"; 
	    }
	         	 else
		{ 
		$col = "cococo"; 
		} 
?>
<tr bgcolor=<?=$col?>>
		<td width=90>
			<?=$dateAdd?><br><br>
		</td>
		<td width=400>
			<a class=BlackLink href="JobInfo.php?job_id=<?=$as[job_id]?>"><font size=3 color=blue><?=$as[position]?></font></a><br>
			<?=$as[CompanyState]?><br>
		</td>
	</tr>
</table>
<?
}
?>			

			</table>
		</td>
	</tr>
</table>		
		



<? include_once('../footer.php'); ?>
					